/***********************************************************************************************************************************
 *    Name:	GetDBExtents.sql
 *  Author: Frank Figearo — http://sqlnerd.me/ — frank@sqlnerd.me
 * Summary:	EXECUTE DBAdmin.GetDBExtents
**/
DECLARE @db SYSNAME= DB_NAME(), @Total INT, @Used INT, @Changed INT;
EXECUTE master.DBAdmin.GetDBExtents @db=@db, @Total=@Total OUTPUT, @Used=@Used OUTPUT, @Changed=@Changed OUTPUT;
SELECT Total= @Total, Used= @Used, Changed= @Changed, Unchanged= @Used-@Changed, [% @Total]= 100*@changed/@total, [% @Used]= 100*@changed/@used;
GO